package Test;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class AutomaticRollCallDevice {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list,"张三","李四","王五","赵六");
        Random r = new Random();
        int Index = r.nextInt(list.size());

        System.out.println("被点到的是:" + list.get(Index));


    }
}
